<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMasterTeacherTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('master_teacher', function (Blueprint $table) {
//            $table->comment('教育工作-班主任');
            $table->bigInteger('id', true);
            $table->bigInteger('user_id')->nullable();
            $table->json('grade_value')->nullable();
            $table->json('class_value')->nullable();
            $table->json('chief_value')->nullable();
            $table->date('begin_date')->nullable();
            $table->date('end_date')->nullable();
            $table->dateTime('created_at')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable()->default(0);
            $table->dateTime('updated_at')->nullable()->useCurrent();
            $table->bigInteger('updater_id')->nullable()->default(0);
            $table->integer('deleted')->nullable()->default(0);
            $table->bigInteger('data_version_id')->nullable();
            $table->bigInteger('form_instance_id')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('master_teacher');
    }
};
